Item Property

Task Parallel System.Threading

Gets or sets the value associated with the specified key.

Namespace:  System.Collections.Concurrent
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Property Item ( _
	key As TKey _
) As TValue
C#
public TValue Item[
	TKey key
] { get; set; }

Parameters

key
Type: TKey
The key of the value to get or set.

Field Value

The value associated with the specified key. If the specified key is not found, a get operation throws a KeyNotFoundException, and a set operation creates a new element with the specified key.

Implements

IDictionary<(Of <(TKey, TValue>)>)..::.Item[([(TKey])])

Exceptions

ExceptionCondition
System..::.ArgumentNullExceptionkey is a null reference (Nothing in Visual Basic).
System.Collections.Generic..::.KeyNotFoundExceptionThe property is retrieved and key does not exist in the collection.

See Also